//
//  CommonTools.swift
//  WangFangWeiBo
//
//  Created by 王方 on 16/7/12.
//  Copyright © 2016年 wf. All rights reserved.
//

import UIKit

//  点击表情按钮发送的通知名
let DidSeletedEmotionButtonNotification = "DidSeletedEmotionButtonNotification"
//  切换根视图控制器通知名
let SwitchRootVCNotification = "SwitchRootVCNotification"
//  删除表情按钮点击发送的通知名
let DidSelecteDeleteEmoticonButtonNotification = "DidSelecteDeleteEmoticonButtonNotification"
//通用间隔
let HomeCellMargin:CGFloat = 10

//当前屏幕的宽度
let ScreenWidth = UIScreen.mainScreen().bounds.size.width

//当前屏幕的高度
let ScreenHeight = UIScreen.mainScreen().bounds.size.height

//  抽取一个RGB函数
func RGB(red: CGFloat, green: CGFloat, blue: CGFloat) -> UIColor {
    
    return UIColor(red: red, green: green, blue: blue, alpha: 1)
}
//  产生随机颜色
func RandomColor() -> UIColor {
    
    // 获取随机产生的色值
    let red = random() % 256
    let green = random() % 256
    let blue = random() % 256
    return RGB(CGFloat(red) / 255, green: CGFloat(green) / 255, blue: CGFloat(blue) / 255)
}